package com.sc.nft.admin.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.NFTProductShowSalvagePrefectureEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class UpdateProductRequest {
    @ApiModelProperty("商品id")
    @NotNull(message = "商品id不能为空")
    private Long productId;

    @ApiModelProperty("商品名称")
    @NotBlank(message = "商品名称不能为空")
    private String firstTitle;

    @ApiModelProperty("价格")
    private BigDecimal productNum;

    @ApiModelProperty("积分价格")
    private BigDecimal integralNum;


    @ApiModelProperty("开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "开始时间不能为空")
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "开始时间不能为空")
    private Date endTime;

    @ApiModelProperty("购买上限")
    @Range(min = 1)
    private Integer upperLimit;

    @ApiModelProperty("是否是优先购商品")
    @NotNull(message = "请设置是否是优先购商品")
    private Boolean isPriorityPurchase;

    @ApiModelProperty("优先购数量(个人)")
    private Integer priorityPurchaseLimit;


    @ApiModelProperty("优先购购买上限(所有人)")
    private Integer priorityPurchaseAllLimit;


    @ApiModelProperty("优先购开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date priorityPurchaseBeginTime;

    @ApiModelProperty("优先购结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date priorityPurchaseEndTime;

    @ApiModelProperty("是否是优先抢商品")
    @NotNull(message = "请设置是否是优先抢商品")
    private Boolean isRushBuy;

    @ApiModelProperty("优先抢数量")
    private Integer rushBuyLimit;

    @ApiModelProperty("优先抢开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date rushBuyBeginTime;

    @ApiModelProperty("优先抢结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date rushBuyEndTime;

    @ApiModelProperty("排序")
    private Long collectionsConcernedNum;

    @ApiModelProperty("权益道具id")
    private Long equityPropsId;

    @ApiModelProperty("权益道具数量")
    private Integer equityPropsNum;

    @ApiModelProperty("是否为仅熔炼")
    private Boolean isSmeltingOnly=Boolean.FALSE;

    @ApiModelProperty("合成数量")
    private Integer synthesisCount;

    @ApiModelProperty("分润模板Id")
    private Long shareProfitPanelId;

    @ApiModelProperty("是否为平台展示")
    private Boolean platformShow;

    @ApiModelProperty("是否为品牌岛展示")
    private Boolean brandShow;

    @ApiModelProperty("是否为企业展示")
    private Boolean firmShow;

    @ApiModelProperty("展示专区")
    private NFTProductShowSalvagePrefectureEnum showSalvagePrefecture;

    @ApiModelProperty("是否开启注册时间限制")
    @NotNull(message = "是否开启注册时间限制不能为空")
    private Boolean isRegisterTime;

    @ApiModelProperty("注册开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerBeginTime;

    @ApiModelProperty("注册结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerEndTime;

    @ApiModelProperty("铸造/重铸须知")
    private String ecologyCastPresentation;
}
